
package com.mcxx.modules.miniSalvation.family.service.read;

import com.mcxx.modules.miniSalvation.check.dto.CheckMemberDTO;
import com.mcxx.modules.miniSalvation.check.dto.IntegrateCheckMemberDTO;
import com.mcxx.modules.miniSalvation.family.dao.read.FamilyMemberHistoryReadDao;
import com.mcxx.modules.miniSalvation.family.dto.FamilyMemberDTO;
import com.mcxx.modules.miniSalvation.family.dto.FamilyMemberHistoryDTO;
import com.mcxx.modules.miniSalvation.family.dto.MemberCardRtnDTO;
import com.mcxx.modules.miniSalvation.family.entity.FamilyMemberHistoryEntity;
import com.mcxx.modules.system.dto.ConfirmListMemberDTO;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@TaTransactional(readOnly = true)
public class FamilyMemberHistoryReadService {

    @Autowired
    private FamilyMemberHistoryReadDao familyMemberHistoryReadDao;

    public List<FamilyMemberHistoryEntity> listAll() {
        return familyMemberHistoryReadDao.listAll();
    }



    public FamilyMemberHistoryEntity getById(String id) {
        return familyMemberHistoryReadDao.getById(id);
    }


    public FamilyMemberHistoryEntity getBySourOrderId(String memberId,String sourOrderId) {
        return familyMemberHistoryReadDao.getBySourOrderId(memberId,sourOrderId);
    }


    public FamilyMemberDTO getByIdAndBusinessCode(String id,String businessCode) {
        return familyMemberHistoryReadDao.getByIdAndBusinessCode(id,businessCode);
    }


    public List<FamilyMemberDTO> listByOrderId(String orderId) {
        return familyMemberHistoryReadDao.listFamilyMemberHistory(orderId);
    }


    public List<String> getFamilySaveMemberList(String orderId) {
        return familyMemberHistoryReadDao.queryFamilySaveMemberList(orderId);
    }

    public List<FamilyMemberHistoryEntity> queryByOrderAndOrgId(FamilyMemberHistoryEntity entity){
        return familyMemberHistoryReadDao.queryByOrderAndOrgId(entity);
    }

    public List<FamilyMemberHistoryEntity> queryByOrderId(String id){return familyMemberHistoryReadDao.queryByOrderId(id);}


    public List<FamilyMemberHistoryDTO> listByOrderIdAndIdCards(String orderId, List<String> idcards) {
        return familyMemberHistoryReadDao.listByOrderIdAndIdCards(orderId,idcards);
    }


    public List listTempByOrderId(String orderId) {
        return familyMemberHistoryReadDao.listTempByOrderId(orderId);
    }



    public FamilyMemberHistoryEntity queryByIdcard(String idcard){
        return familyMemberHistoryReadDao.queryByIdcard(idcard);
    }

    public MemberCardRtnDTO queryMemberHistoryByCardId(String idcard) {
        return familyMemberHistoryReadDao.queryMemberHistoryByCardId(idcard);
    }

    public MemberCardRtnDTO queryLowerMemberHistoryByCardId(String idcard) {
        return familyMemberHistoryReadDao.queryLowerMemberHistoryByCardId(idcard);
    }

    public List<String> getUnnormalMasterByFamilyIds(List<String> orderId){
        return familyMemberHistoryReadDao.getUnnormalMasterByFamilyIds(orderId);
    }

    public List<IntegrateCheckMemberDTO> selectIntegrateMember(String orderId, String familyId){
        return familyMemberHistoryReadDao.selectIntegrateMember(orderId,familyId);
    }

    public List<CheckMemberDTO> selectMemberListInfo(String orderId,String familyId) { return familyMemberHistoryReadDao.selectMemberListInfo(orderId,familyId);}

    public List<ConfirmListMemberDTO> selectConfirmMemberDTO(String orderId){
        return familyMemberHistoryReadDao.selectConfirmMemberDTO(orderId);
    }

    public Integer selectIsSalvByIdcard(String idcard,String nowMonth){
        return familyMemberHistoryReadDao.selectIsSalvByIdcard(idcard,nowMonth);
    }
}
